﻿using System;
using IFDB.ResourceLibrary;

namespace IFDB.Models.Tables
{
    public class Season
    {
        public Guid SeasonId { get; set; }
        public Country Country { get; set; }
        public string SeasonName { get; set; }
        public DateTime StartDate { get; set; }
        public DateTime EndDate { get; set; }

        public static Season CreateNew(Country country, string seasonName, DateTime startDate, DateTime endDate)
        {
            return new Season()
            {
                SeasonId = Guid.NewGuid(),
                Country = country,
                SeasonName = seasonName,
                StartDate = startDate,
                EndDate = endDate
            };
        }

        public static void Update(Season season, Country country, string seasonName, DateTime startDate, DateTime endDate)
        {
            season.Country = country;
            season.SeasonName = seasonName;
            season.StartDate = startDate;
            season.EndDate = endDate;
        }
    }
}
